import { createRouter, createWebHistory } from 'vue-router'
import Skip from '../views/Skip.vue'
import realTimeMonitoring from '../components/real-time-monitoring.vue'
import wlsDetails from '../components/common/wls-details.vue'
import wlsauthenticate from '../components/common/authenticate.vue'
import wlsuploadrecord from '../components/common/uploadrecord.vue'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  linkActiveClass: 'my-active', // 路由激活时添加的类名
  linkExactActiveClass: 'my-active', // 链接被精确匹配激活时添加的类名
  routes: [
    {
      path: "/",
      redirect: { name: "Skip" }
    },
    {
      path: '/Skip',
      name: 'Skip',
      component: Skip
    },
    {
      path: '/demo',
      name: 'demo',
      component: () => import('../components/common/demo.vue')
    },
    {
      path: '/realTimeMonitoring',
      name: 'realTimeMonitoring',
      component: realTimeMonitoring
    },
    {
      path: '/:page/wlsDetails',
      name: 'wlsDetails',
      component: wlsDetails
    },
    {
      path: '/:page/wlsauthenticate',
      name: 'wlsauthenticate',
      component: wlsauthenticate
    },
    {
      path: '/:page/wlsuploadrecord',
      name: 'wlsuploadrecord',
      component: wlsuploadrecord
    },
    {
      path: '/CameraManagement',
      name: 'CameraManagement',
      component: () => import('../components/Camera-management.vue')
    },
    {
      path: '/authenticate/realTimeCamera',
      name: 'realTimeCamera',
      component: () => import('../components/authenticate/real-time-camera.vue')
    },
    {
      path: '/authenticate/infraredCamera',
      name: 'infraredCamera',
      component: () => import('../components/authenticate/infrared-camera.vue')
    },
    {
      path: '/authenticate/empty',
      name: 'empty',
      component: () => import('../components/authenticate/empty.vue')
    },
    {
      path: '/authenticate/recycleBin',
      name: 'recycleBin',
      component: () => import('../components/authenticate/recycle-bin.vue')
    },
    {
      path: '/result',
      name: 'result',
      component: () => import('../components/result.vue')
    },
    {
      path: '/result/details',
      name: 'resultDetails',
      component: () => import('../components/result-details.vue')
    },
    {
      path: '/favorite',
      name: 'favorite',
      component: () => import('../components/favorite.vue')
    },
    {
      path: '/favorite/details',
      name: 'favoriteDetails',
      component: () => import('../components/favorite-details.vue')
    },
    {
      path: '/statisticAnalysis',
      name: 'statisticAnalysis',
      component: () => import('../components/statistic-analysis.vue')
    },
    {
      path: '/layout',
      name: 'layout',
      component: () => import('../components/layout.vue')
    },
  ]
})

export default router
